#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x

trigger-domains-post-app-clone-setup() {
  declare desc="removes domain files when setting up a clone"
  declare trigger="post-app-clone-setup"
  declare OLD_APP="$1" NEW_APP="$2"
  local APP_DIR="$DOKKU_ROOT/$NEW_APP"

  rm -rf "$APP_DIR/URLS" "$APP_DIR/VHOST"
}

trigger-domains-post-app-clone-setup "$@"
